import http from '../http'

// 渲染数据列表
export const dataListApi=(page,size)=>http({
    url: "/storehouse/select",
    method:"post",
    params:{page,size}
})

// 条件搜索渲染数据列表
export const searchDataListApi = (depot,from,page,size,state,to) => http({
    url:"/storehouse/selectByDateOut",
    method:'post',
    params:{depot,from,page,size,state,to}
})
// 下拉框渲染
export const downApi = () => http({
    url:"/storehouse/outDropDownlist",
    method:'post',
})

// 排序方式
export const orderApi = (order) => http({
    url:"/",
    method:'post',
    params:{order}
})

// 删除数据列表
export const deleteListApi=(id)=>http({
    url:"/storehouse/delete",
    method:"post",
    params:{
        id
    }
})

// 审批
export const approveApi=(comments,id)=>http({
    url:"/storehouse/check",
    method:"post",
    params:{
        comments,id
    }
})

// 预览和编辑数据渲染
export const getDataApi=(orderId)=>http({
    url:"/storehouse/selectByGoodsXq",
    method:"post",
    params:{
        orderId
    }
})

// 导出
export const exportApi = () => http({
    url:"/storehouse/outlist",
    method:"get",
    responseType:'blob'
})

// 获得总数
export const dataListCount = () => ({
    url:"",
    method:"post",
})


